# -*- coding: utf-8 -*-
# @Time    : 2020/11/8 16:07
# @Author  : DuJiabao
# @File    : GreatestCommonDivisor.py
# @Description : This is a program to calculate to Greatest Common Divisor between two nums. 最大公因数

def gcd(M, N):
    while N > 0:
        M, N = N, M % N
    return M


if __name__ == '__main__':
    print(gcd(151, 3))
